import request from "@/utils/request"

/// //////////////////用户操作//////////////////////////
// 用户列表
export const getListData = params => {
  return request({
    url: "/ydd_user/list",
    method: "GET",
    params
  })
}
// 所有用户
export const getAllData = params => {
  return request({
    url: "/ydd_user/allData",
    method: "GET",
    params
  })
}

// 用户详情
export const getInfoData = id => {
  return request({
    url: "/ydd_user/rowInfo",
    method: "GET",
    params: {
      id
    }
  })
}

/**
 * 用户添加
 * @param {*} data  添加数据
 */
export const addData = data => {
  return request({
    url: "/ydd_user/add",
    method: "POST",
    data
  })
}
/**
 * 用户更新
 * @param {*} data   修改数据  修改的数据对象中一定要携带id!
 */
export const updateData = data => {
  return request({
    url: "/ydd_user/update",
    method: "POST",
    data
  })
}
/**
 * 用户删除
 * @param {*} id  删除id
 */
export const delData = params => {
  return request({
    url: "/ydd_user/del",
    method: "GET",
    params
  })
}
